# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=libdisasm
pkgver=0.23
pkgrel=2
pkgdesc='A disassembler library.'
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-disassembler')
url='http://bastard.sourceforge.net/libdisasm.html'
license=('custom:Artistic')
source=("http://downloads.sourceforge.net/project/bastard/$pkgname/0.23/$pkgname-$pkgver.tar.gz")
sha512sums=('29eecfbfd8168188242278a1a38f0c90770d0581a52d4600ae6343829dd0d6607b98329f12a3d7409d43dd56dca6a7d1eb25d58a001c2bfd3eb8474c0e7879e7')

build() {
  cd "$pkgname-$pkgver"

  if [[ "$CARCH" == "i686" || "$CARCH" == "x86_64" ]];
  then
    ./configure --prefix=/usr
  else
    ./configure --prefix=/usr --build=arm
  fi

  make
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="$pkgdir/" install
}

